Skip to content

fix(citations): number displayed citations by appearance - #724

Open
DivyamTalwar wants to merge 1 commit into
VectifyAI:mainfrom
DivyamTalwar:fix/citation-display-order
Open

DivyamTalwar wants to merge 1 commit into
VectifyAI:mainfrom
DivyamTalwar:fix/citation-display-order

Conversation

@DivyamTalwar

Copy link
Copy Markdown

Summary

resolve_citations() supports two citation tag formats. It previously numbered legacy tags before modern tags even when the modern citation came first in the answer, producing a display like [2] [1] [2].

Assign display numbers as the tags appear in the answer and put the resolved citation entries in the same order. A repeated citation keeps the number it first received.

Validation

  • The public SDK regression mixes both formats and verifies link order, repeated links, and the corresponding document IDs.
  • 15 citation-related tests passed, including block enrichment, paired tags, and scoped resolution.
  • git diff --check passes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants